<!-- 新增户型 -->
<style>
    .cell-split {
        padding-bottom: 10px;
    }
    .edui-editor-iframeholder{height: 100px !important;}
    .ui-dialog-body{padding-bottom: 10px !important;}
</style>
<form name="houseTypeForm" style="width:715px;min-height: 500px;max-height: 515px;overflow-y: auto;">
    <div>
        <table width="100%">
            <tr>
                <td width="110" align="right" class="form-cell" valign="top"><span class="c-red">* </span>户型类型：</td>
                <td class="cell-split">
                    <div class="fl" style="width:300px;" ui-combobox data="categorys"
                         text-field="Text" value-field="Value" ng-model="data.category">
                    </div>
                </td>
            </tr>
            <tr>
                <td width="110" align="right" class="form-cell" valign="top"><span class="c-red">* </span>户型名称：</td>
                <td class="cell-split">
                    <div ng-if="data.category!=='0'">
                        <input type="text" name="house_type_name" class="input-text fl mr10" ng-model="data.name" style="width:300px" maxlength="10" required>
                        <p class="c-gray lh30">最多10个字，如：3室2厅2卫</p>
                        <div ng-messages="houseTypeForm.house_type_name.$error"
                             ng-show="houseTypeForm.$submitted || houseTypeForm.house_type_name.$touched" style="clear: both;">
                            <p class="c-red" ng-message="maxlength">最多10个字，如：3室2厅2卫</p>
                            <p class="c-red" ng-message="required">不能为空</p>
                        </div>
                    </div>
                    <div ng-if="data.category==='0'">

                        <input type="number" positive-integer name="bedroom_number" required class="input-text fl mr10" style="width: 73px" ng-model="data.bedroom_number"/>
                        <span class="fl mr10" style="padding: 4px 6px 4px 0;">室</span>
                        <input type="number" positive-integer name="main_hall_number" required class="input-text fl mr10" style="width: 73px" ng-model="data.main_hall_number"/>
                        <span class="fl mr10" style="padding: 4px 6px 4px 0;">厅</span>
                        <input type="number" positive-integer name="bathroom_number" required class="input-text fl mr10" style="width: 73px" ng-model="data.bathroom_number"/>
                        <span class="fl mr10" style="padding: 4px 6px 4px 0;">卫</span>
                        <div ng-show="houseTypeForm.$submitted
                            || houseTypeForm.bedroom_number.$touched
                            || houseTypeForm.main_hall_number.$touched
                            || houseTypeForm.bathroom_number.$touched
                            " style="clear: both;">
                            <p class="c-red" ng-show='houseTypeForm.bedroom_number.$invalid
                                || houseTypeForm.main_hall_number.$invalid
                                || houseTypeForm.bathroom_number.$invalid'>
                                <span ng-show="houseTypeForm.bedroom_number.$error.required">室</span>
                                <span ng-show="houseTypeForm.main_hall_number.$error.required">厅</span>
                                <span ng-show="houseTypeForm.bathroom_number.$error.required">卫</span>
                                <span>不能为空</span>
                            </p>
                        </div>
                    </div>


                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>户型编号：</td>
                <td class="cell-split">
                    <input type="text" name="house_type_code" class="input-text fl mr10" ng-model="data.code"  required style="width:300px" maxlength="10">
                    <p class="c-gray lh30" >最多10个字，如A1</p>
                    <div ng-messages="houseTypeForm.house_type_code.$error"
                         ng-show="houseTypeForm.$submitted || houseTypeForm.house_type_code.$touched" style="clear: both;">
                        <p class="c-gray" ng-message="maxlength">最多10个字，如A1</p>
                        <p class="c-red" ng-message="required">不能为空</p>
                    </div>

                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>建筑面积：</td>
                <td class="cell-split">
                    <div class="count-box fl" style="width:300px; margin-right:5px" id="buildingArea">
                        <input class="input-text" type="number" custom-float ng-model="data.building_area" placeholder="" name="bldarea" required="" />
                    </div>
                    <span class="fl lh30 mr10" style="width:15px;">㎡</span>
                    <p class="fl c-gray lh30">请输入数字，最多两位小数，如：90.89</p>
                    <div ng-messages="houseTypeForm.bldarea.$error"
                         ng-show="houseTypeForm.$submitted || houseTypeForm.bldarea.$touched" style="clear: both;">
                        <p class="c-red" ng-message="required">不能为空</p>
                        <p class="c-red" ng-message="number">请输入数字</p>
                    </div>

                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell" valign="top">显示顺序：</td>
                <td class="cell-split">
                    <div class="count-box" style="width:300px" id="displayOrder">
                        <input class="input-text" type="text" positive-integer  ng-model="data.orders" placeholder="" name="orders" ng-maxlength="4"  data-min-value="0" />

                        <div ng-messages="houseTypeForm.orders.$error"
                             ng-show="houseTypeForm.$submitted || houseTypeForm.orders.$touched" style="clear: both;">
                            <p class="c-red" ng-message="maxlength">长度不能大于4位</p>
                            <p class="c-red" ng-message="integer">必须为数字</p>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell" valign="top">户型介绍：</td>
                <td class="cell-split">
                    <div id="editor" ueditor ng-model="data.introduction" style="width:550px;height:150px;"></div>
                </td>
            </tr>
            <tr>
                <td align="right" class="form-cell" valign="top"><span class="c-red">* </span>户型图片：</td>
                <td class="cell-split" id="td_house_type_pic">
                    <div ng-repeat="pic in data.pic_url_list">
                        <div class="fl pic-item" >
                            <span class="pic-del" title="删除" ng-click="data.pic_url_list.splice($index,1)"><i class="icon-op icon-op-del"></i></span>
                            <img ng-src="{{pic}}" alt="户型图片" title="户型图片" />
                        </div>
                    </div>


                    <div ng-show="!data.pic_url_list || data.pic_url_list.length<10" id="fileupload" class="fileinput-button fl" title="点击上传图片">
                        <div class="upload-wrap" id="img_wrap">
                            <div class="upload-btn"><i class="upload-icon"></i></div>
                            <span class="c-blue f12">上传图片</span>
                        </div>
                        <input type="file" name="file" accept="image/*" />
                    </div>
                    <p style="clear:both;">推荐尺寸640px*360px，支持ipg/gif/png格式</p>
                    <p class="c-red none" id="house_type_pic_err" style="clear:both;"></p>
                    <div ng-show="houseTypeForm.$submitted && (!data.pic_url_list || data.pic_url_list.length==0 || data.picLimit)" style="clear: both;">
                        <p class="error" >至少插入一张图片,并且上传图片最多不能超过10张。</p>
                    </div>
                </td>
            </tr>
        </table>
    </div>

</form>